home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / raytrace / pov / gen / form04a / formed.bat < prev    next >
DOS Batch File  |  1993-12-07  |  806b  |  47 lines

  1. @echo off
  2. rem FORMED.BAT
  3. :top
  4. if "%1"=="" goto usage
  5.  
  6. if NOT "%edit%"=="" goto have_edit
  7.  
  8. if exist %1.frm call edit %1.frm
  9. if exist %1.frm goto :formit
  10. if exist %1 call edit %1
  11. if exist %1 goto :formit
  12. goto :new_file
  13.  
  14. :have_edit
  15. if exist %1.frm call %edit% %1.frm
  16. if exist %1.frm goto :formit
  17. if exist %1 call %edit% %1
  18. if exist %1 goto :formit
  19. goto :new_file
  20.  
  21. :formit
  22. form %1
  23. echo "press [CTRL BREAK] to stop" 
  24. pause
  25. goto :top
  26.  
  27. :new_file
  28. echo // A FORM > %1.frm
  29. if NOT exist %1.frm goto :has_FRM
  30. echo end; >> %1.frm
  31. rem we have created an empty file, try again
  32. goto :top
  33. :has_FRM
  34. echo // A FORM > %1
  35. echo end; >> %1
  36. rem we have created an empty file, try again
  37. goto :top
  38.  
  39.  
  40. :usage
  41. echo Usage: FORMED filename, goes through an editing cycle for a form
  42.  
  43.  
  44. :end
  45.  
  46.  
  47.